<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$config = array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'The SVN Wrapper',
 	'defaultController'=>'folder',

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'ext.common.registry.models.Registry',
		'ext.Hq.openIDUserModule.models.OpenIdUser',
		'ext.Hq.HqController.HqController',
	),

	// preloading 'log' component
	'preload'=>array('log', 'bkui'),

	// autoloading model and component classes

	'modules'=>array(
		// uncomment the following to enable the Gii tool


		'user'	=>	array(
			'class'	=>	'ext.Hq.openIDUserModule.OpenIdUserModule',

			'roles'	=>	array('ADMIN','DEVELOPER'),
		),
	),

	'controllerMap'=>array(
		'HttpUser'=>array(
			'class'=>'ext.common.HttpAuth.controller.HttpUserController',
			'userComponent'=>'user',
		),
		'registry'=>array(
			'class'=>'ext.common.registry.controllers.RegistryController',
		),
	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),

		'bkui'=>array(
        	'class'=>'ext.common.bkui.BKUIComponent',
        	'bootstrap'=>array(
            	'yiiCss'=>true,
            	'responsiveCss'=>true,
        	),
		),
		'user'=>array(
			'class'=>'ext.Hq.HqUserComponent',
			'allowAutoLogin'=>true,
			'loginUrl'=>array('/user/signIn'),
		),

		'registry'=>array(
			'class'=>'ext.common.registry.RegistryComponent',
		),

		'httpUser'=>array(
			'class'=>'ext.common.HttpAuth.HttpUserComponent',
		),
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=svn_wrapper',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'utf8',
			'schemaCachingDuration'=>3600,
		),
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),

	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'svnCommand'=>'reg://svnCommand',
	),
//	 CDbConnection::enableParamLogging
);

if (defined('YII_DEBUG') && YII_DEBUG)
	$config = CMap::mergeArray($config, require(dirname(__FILE__) . '/debug.conf.php'));
return $config;
